import request from '@/utils/request'
let name
export function login(data) {
  name=data.username
  return request({
    url: '/sys/login',///vue-admin-template
    method: 'post',
    params:{
      "username":data.username,
      "password":data.password,
      "captcha":data.captcha
    }
  })
}
export function getInfo(token) {
  console.log(name)
  return request({
    url: '/sys/user/info',///vue-admin-template
    method: 'post',
    params:token
  })
}

export function logout() {
  return request({
    url: '/logout',///vue-admin-template
    method: 'post'
  })
}
// 动态路由
// export function DongtRouter() {
//   return request({
//       url: `/aoaoe/api/getMoveRouter`,
//       method: 'get',
//   })
// }
